package com.wfe.db.com.wfe.listener;

import org.hibernate.event.SaveOrUpdateEvent;
import org.hibernate.event.def.DefaultSaveOrUpdateEventListener;

import com.wfe.db.SessionUtil;

public class WFEInsertListener extends DefaultSaveOrUpdateEventListener
{

	/**
	 *
	 */
	private static final long serialVersionUID = 622520647980713933L;

	@Override
	public void onSaveOrUpdate(final SaveOrUpdateEvent event)
	{
		super.onSaveOrUpdate(event);
		SessionUtil.closeSession(event.getSession());
	}

}
